package numbers;

import org.testng.Assert;
import org.testng.annotations.Test;

import java.util.Scanner;

/**
 * Created by admin on 16.06.2014.
 */

public class PrimeNumbers {
    public static boolean checkNumberisPrime(int a) {
        if (a == 1) return false;
        for (int i = 2; i * i < a; i++) {
            if (a % i == 0) return false;
        }
        return true;
    }

    @Test
    public void info() {
        Assert.assertTrue(checkNumberisPrime(3));
    }


}
